<?php
require_once("www/php_java.php");//引用LAJP提供的PHP脚本

function getSignData () {
    if (!isset($_POST['data'])) {
        die(json_encode(['code' => 0, 'msg' => '缺少必要参数data']));
    }
    if (!isset($_POST['prikey'])) {
        die(json_encode(['code' => 0, 'msg' => '缺少必要参数prikey']));
    }
    if (!isset($_POST['signalg'])) {
        die(json_encode(['code' => 0, 'msg' => '缺少必要参数signalg']));
    }
    if (!isset($_POST['p12pwd'])) {
        die(json_encode(['code' => 0, 'msg' => '缺少必要参数p12pwd']));
    }
   
    $ret = lajp_call("cfca.sadk2.api.EnvelopeKitSm2::openEvelopedMessageSm2",  $_POST['data'],$_POST['signalg'], $_POST['prikey'], $_POST['p12pwd']);
    die($ret);
};
getSignData();